package club.pchome.util;

import java.io.IOException;
import java.rmi.server.ExportException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.jsoup.Jsoup;
import org.jsoup.Connection;
import org.jsoup.Connection.Method;
import org.jsoup.Connection.Response;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;

import club.pchome.common.constant.SystemConstant;
import club.pchome.dto.Result;
import club.pchome.dto.UserInfoDto;

//@Service
public class JsoupSignAdm {
	static Logger logger = LoggerFactory.getLogger(JsoupSignAdm.class);
	
	public static void main(String[] args) {
//		String userInfo = "{\"loginName\":\"13113697731\",\"pwd\":\"123456\"}";
//
//		String result = new JsoupSignAdm().AdmLogin(userInfo);
//
//		System.out.println(result);
		
//		String JSESSIONID = "994451B091861F0DCD911C68635D9316";
//		System.out.println(new JsoupSignAdm().JsoupToDataByCookie("https://adm.folad.cn/member-api/api/user/isOpenDirect", JSESSIONID));
//		System.out.println(new JsoupSignAdm().JsoupToDataByCookie("https://adm.folad.cn/member-api/api/common/getToken", JSESSIONID));
// 767192

		Response res;
		String body = null;
		try {

			res = Jsoup.connect( "http://mobile.yangkeduo.com/proxy/api/api/sigerus/login_mobile?pdduid=0" )
					.header("Accept", "application/json, text/plain, */*")
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Host" , "mobile.yangkeduo.com")
					.header("Referer", "http://mobile.yangkeduo.com/login.html")
//					.proxy("127.0.0.1", 8888)
					.requestBody("{\"mobile\":\"13076906186\",\"code\":\"767192\",\"anti_content\":\"0aoAfxnUGNcyg9TVruLTe2gsGo9zUdwcSZmhAORjs2ssg_7-foJ0UJYYuKAaJh7cYbcpDCITUF2-_bs8ZQtg3pU0WP_dlQU_ZCSwIRw3QHYSLg9oQSnG5tM4tJwpnkgkFSqx6plvr03NT820EGqaLXjIEdeKtYaz1Y9AMGTl7M3piWMh7QaO8XsqysvQ4cnkvJ3p1ypPDUNei1SJM-ILdq75Ow6TO-F1_79lKfF0N2O03aGjg44QR7mX4PYf0BFCwR3JE9BEdxZY9jKwoUrwB7kCyz9pvwGLXusopoAwqw57D-gglIs9dY5nJSGGJE630Zqv2mGyHd5NQ7JLHV8r9XeR58w4xgFmotDJGJEFvIavR5ykPt7QpJEEYSQ4ekZJ5VVjuyCcSv8-UDx5qqugrEfZzNpjJOoWjR8WDtRhzpWrtq_zRC0QbUfIwatco7fR_HmBcaJGyoreCdLgdHuOOsryKrjizWeaXnKXaS1U5lF03hajeufOeZRNkW2Hg5YKR6mfa8u-hi-Ro2GJPN1\"}")
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {


				System.out.println(res.body());

			}else {
				logger.info("获取失败，重新获取!!!");
			}

		} catch (IOException e) {
			e.printStackTrace();
		}


//		Response res;
//		String body = null;
//		try {
//
//			res = Jsoup.connect( "http://mobile.yangkeduo.com/proxy/api/api/sigerus/mobile/code/request?pdduid=0" )
//					.header("Accept", "application/json, text/plain, */*")
//					.header("Accept-Encoding", "gzip, deflate, br")
//					.header("Accept-Language", "zh-CN,zh;q=0.9")
//					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
//					.header("Content-Type", "application/json;charset=utf-8")
//					.header("Host" , "mobile.yangkeduo.com")
////					.proxy("127.0.0.1", 8888)
//					.requestBody("{\"platform\":\"4\",\"mobile\":\"13076906186\",\"screen_token\":\"0aoAfxnUXycYY9TC4uISTKsJHZazZs91vIDcR3G6m_VJF4dESCd4VedwQbeaJL7cYbZsbP0vo3r9iGlB86Z97Cg0-qI4LYVLzVBlNRXfrY99n9gM1GjSok0AxSrYl0NpoTq2QA68eeONsS-fzmkWQZ5jKA1XYaFah_UkyHKntVR9gueCCkC81X-x8TAuxPOu6snXzLpf1MNeveD1i217p7Gyw52L8NHFiknLW4jD_s3z8pDfZeo5tIrmuBjqmTYANIEazfeHkxpwZKIUrOFtExZIpM9gQs49RwGGWHB0y0f0c8ajGEml89OaaFD6OzK3o7gNywKdoP61gCYc9hogndmlYBAaqEGWfIBtZa44sz5nQgOQr5O9l3CupSTtcy5FTLTKLz3x6WJZFIjfepLUhQEu9j4wizHUPPNomN-sLZhrkHbKMw2X4rIVHXJhW3P5h2KY80jFZ7MezO3a0BSEWOJuQLruW5ZKBWQzsIfPRxBDDkFs4kF_V0A7XtUL1UNOh9rqcnnjER04uKOwyBpI7Cpptn-nVdUZJvmvQQQvaWvWhW_ZuaK6HK8rby0snjyRY8R2v_3M0g\"}")
//					.timeout(6000)
//					.ignoreContentType(true)
//					.validateTLSCertificates(false)
//					.method(Method.POST)
//					.execute();
//
//			if(res.statusCode() == 200) {
//
//
//				System.out.println(res.body());
//
//			}else {
//				logger.info("获取失败，重新获取!!!");
//			}
//
//		} catch (IOException e) {
//			e.printStackTrace();
//		}
	}
	

	public Result<String> feedAnimalDemo(){


				//获取cookie
				String JSESSIONID = "994451B091861F0DCD911C68635D9316";

				if(JSESSIONID != null) {
					//喂养前先收取鸡蛋
					String receiveEgg = JsoupToDataByCookieAndBody(SystemConstant.receiveEgg, "{\"userAnimalId\":\"1907\"}" , JSESSIONID);
					
					JSONObject receiveEggJson = JSONObject.parseObject(receiveEgg);
					System.out.println(receiveEggJson);
					int _code_1_ = receiveEggJson.getInteger("code");
					if(_code_1_ == 200) {
						//喂养动物
						String feedAnimal = JsoupToDataByCookieAndBody(SystemConstant.feedAnimal,  "{\"userAnimalId\":\"1907\"}" , JSESSIONID);
						JSONObject feedAnimalJson = JSONObject.parseObject(feedAnimal);
						int _code_2_ = feedAnimalJson.getInteger("code");
						String msg = feedAnimalJson.getString("msg");
						if(_code_2_ == 200) {
							logger.info(" - 喂食"+msg+"!!! 时间: " + DateUtil.FMT_FN.format(new Date()));
						}else {
							logger.info(msg);
						}
					}
				}else {
					logger.error(" , 登录失败!!! ");
				}
				return null;

	}

	public String uploadFile() {
		Response res;
		String body = null;
		try {
			
			res = Jsoup.connect( "https://upload-z2.qiniup.com/" )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundary0mBhZvotqA4SMdgD")
					.header("Accept", "application/json, text/plain, */*")
					.header("lang", "ZH")
//					.proxy("127.0.0.1", 8888)
//					.requestBody(userInfo)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {
				//获取登录状态的cookie
				body = res.cookie("JSESSIONID");

			}else {
				logger.info("获取失败，重新获取!!!");
				body = "501";
			}

		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}

	/**
	 * 登录ADM
	 * @param userInfo = "{\"loginName\":\"13113697731\",\"pwd\":\"poiuytrew\"}"
	 * @return
	 */
	public String AdmLogin(String userInfo) {
		Response res;
		String body = null;
		try {
			res = Jsoup.connect( SystemConstant.ADMLOGIN )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
//					.proxy("127.0.0.1", 8888)
					.requestBody(userInfo)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {
				//获取登录状态的cookie
				body = res.cookie("JSESSIONID");

				if(body == null) {//{"code":"10021","errorCode":"PASSWORD_ERROR","msg":"登录名或密码错误"}
					body = "10021";
				}
				
			}else {
				logger.info("获取失败，重新获取!!!");
				body = "501";
			}

		} catch (IOException e) {
			logger.error("Retime Out ......");
//			e.printStackTrace();
			try {
				Thread.sleep(3000);
				AdmLogin(userInfo);
			} catch (InterruptedException ex) {
				ex.printStackTrace();
			}
		}
		return body;
	}

	/**
	 *  模拟测试
	 */
	public String ParsePageBody(){
		Response res;
		String body = null;
		try {
			
			res = Jsoup.connect( SystemConstant.BASEURL )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.proxy("127.0.0.1", 8888)
					.requestBody("{\"loginName\":\"13076906186\",\"pwd\":\"poiuytrew\"}")
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {
				String cookieValue = res.cookie("JSESSIONID");
				System.out.println(new Date().getTime());
				
				
				
				body = new JsoupSignAdm().JsoupByHangList(cookieValue);
				
				System.out.println( body );
				
//				JSONObject jsonObject = JSON.parseObject(body);
//				
//				JSONArray dataList = jsonObject.getJSONArray("data");
//				
//				for (Object obj : dataList) {
//					
//					JSONObject __obj = (JSONObject) obj;
//					
//					Integer  coinId = __obj.getInteger("coinId");
//					String   totalAmount = __obj.getString("totalAmount");
//					String 	 coinName = __obj.getString("coinName");
//					
//					System.out.println(coinId + " _ " + totalAmount + " _ " + coinName);
//				}

				
			}else {
				logger.info("获取失败，重新获取!!!");
				body = "501";
			}

		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	
	
	/**
	 * 待处理任务数量
	 * @param cookie
	 * @return
	 */
	public String WaitTaskCount(String cookie) {
		Response res;
		String body = null;
		try {
			res = Jsoup.connect( SystemConstant.WaitTaskCount )
					.header("Host", "adm.leange.cn")
					.header("Connection", "keep-alive")
					.header("Content-Length", "42")
					.header("Accept", "application/json, text/plain, */*")
					.header("Origin" , "https://adm.leange.cn")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("Cookie", "JSESSIONID="+cookie)
					.header("Referer", "https://adm.leange.cn/member-h5/")
					.requestBody("{}")
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {

				body = res.body();

			}else {
				body = "501";
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	
	/**
	 * 待处理任务数量详情
	 * @param cookie
	 * @return
	 */
	public String WaitTaskCountDetail(String cookie) {
		Response res;
		String body = null;
		try {
			res = Jsoup.connect( SystemConstant.WaitTaskCountDetail )
					.header("Host", "adm.leange.cn")
					.header("Connection", "keep-alive")
					.header("Content-Length", "42")
					.header("Accept", "application/json, text/plain, */*")
					.header("Origin" , "https://adm.leange.cn")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("Cookie", "JSESSIONID="+cookie)
					.header("Referer", "https://adm.leange.cn/member-h5/")
					.requestBody("{}")
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {

				body = res.body();

			}else {
				body = "501";
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	
	/**
	 * 挂单
	 * @param url
	 * @param cookieValue
	 * @return
	 */
	public String JsoupByHangList(String cookie) {
		Response res;
		String body = null;
		try {
			res = Jsoup.connect( SystemConstant.hangList )
					.header("Host", "adm.leange.cn")
					.header("Connection", "keep-alive")
					.header("Content-Length", "42")
					.header("Accept", "application/json, text/plain, */*")
					.header("Origin" , "https://adm.leange.cn")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("Cookie", "JSESSIONID="+cookie)
					.header("Referer", "https://adm.leange.cn/member-h5/")
					.requestBody("{\"pageNo\":1,\"pageSize\":50,\"entrustType\":1}")
					.timeout(6000)
//					.proxy("127.0.0.1", 8888)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {

				body = res.body();

			}else {
				body = "501";
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	
	/**
	 * 签到
	 */
	public String openSign(String cookieValue) {
		Response res;
		String body = null;
		try {
			
			res = Jsoup.connect( SystemConstant.OPEN_SIGN )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("cookie", "JSESSIONID="+cookieValue)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {

				body = res.body();

			}else {
				logger.info("签到失败!!");
				body = "501";
			}


		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	

	/**
	 * @name 获取用户数据
	 * @param cookie
	 * @return
	 */
	public String getCapitalList(String cookieValue) {
		Response res;
		String body = null;
		try {
			
			res = Jsoup.connect( SystemConstant.ACCOUNT_DATA )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("cookie", "JSESSIONID="+cookieValue)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {

				body = res.body();

			}else {
				logger.error("获取用户信息失败!!");
				body = "501";
			}


		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	
	/**
	 * 验证是否可以签到
	 */
	public String checkSignStatus(String cookieValue) {
		Response res;
		String body = null;
		try {
			
			res = Jsoup.connect( SystemConstant.SIGN_STATUS )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
//					.requestBody("{\"loginName\":\"13040861418\",\"pwd\":\"poiuytrew\"}")
					.header("cookie", "JSESSIONID="+cookieValue)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {

				body = res.body();

			}else {
				logger.info("获取失败，重新获取!!!");
				body = "501";
			}


		} catch (IOException e) {
			e.printStackTrace();
		}
		return body;
	}
	
	/**
	 * @name 通用 post 需要传值方法
	 * @url 接口地址
	 * @param cookieValue
	 * @param requestBody
	 * @return
	 */
	public String JsoupToDataByCookieAndBody(String url ,String jsonToString, String cookieValue) {
		Response res;
		String body = null;
		try {
			res = Jsoup.connect( url )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("cookie", "JSESSIONID="+cookieValue)
					.requestBody(jsonToString)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {
				body = res.body();
			}else {
				body = "501";
			}
		} catch (IOException e) {
			logger.error("Retime Out 2......");
//			e.printStackTrace();
			try {
				Thread.sleep(3000);
				JsoupToDataByCookieAndBody(url ,jsonToString , cookieValue);
			} catch (InterruptedException ex) {
				ex.printStackTrace();
			}
		}
		return body;
	}
	
	/**
	 * @name 通用 post 取值方法
	 * @url 接口地址
	 * @param cookieValue
	 * @return
	 */
	public String JsoupToDataByCookie(String url , String cookieValue) {
		Response res;
		String body = null;
		try {
			res = Jsoup.connect( url )
					.header("Accept-Encoding", "gzip, deflate, br")
					.header("Accept-Language", "zh-CN,zh;q=0.9")
					.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
					.header("Content-Type", "application/json;charset=utf-8")
					.header("Endpoint", "h5")
					.header("lang", "ZH")
					.header("cookie", "JSESSIONID="+cookieValue)
					.timeout(6000)
					.ignoreContentType(true)
					.validateTLSCertificates(false)
					.method(Method.POST)
					.execute();

			if(res.statusCode() == 200) {
				body = res.body();
			}else {
				body = "501";
			}
		} catch (IOException e) {
			logger.error("Retime Out 1......");
//			e.printStackTrace();
			try {
				Thread.sleep(3000);
				JsoupToDataByCookie(url , cookieValue);
			} catch (InterruptedException ex) {
				ex.printStackTrace();
			}
		}
		return body;
	}
	
	
	public static String httpGetHeader(String url,String cook,String header) throws IOException{
        //获取请求连接
        Connection con = Jsoup.connect(url);
        //请求头设置，特别是cookie设置
        con.header("Accept", "application/json, text/plain, */*");
        con.header("Accept-Encoding", "gzip, deflate, br");
        con.header("Accept-Language", "zh-CN,zh;q=0.9");
        con.header("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1");
        con.header("Content-Length", "44");
        con.header("Content-Type", "application/json;charset=utf-8");
        con.header("Endpoint", "h5");
		con.header("lang", "ZH");
		con.header("Referer", "https://adm.leange.cn/member-h5/");
		con.header("Connection", "keep-alive");
		con.header("Host", "https://adm.leange.cn");
        con.header("Cookie", cook);
		con.timeout(6000);
		con.ignoreContentType(true);
		con.validateTLSCertificates(false);
        //发送请求
        Response resp=con.method(Method.POST).execute();        
        //获取cookie名称为__bsi的值
        String cookieValue = resp.cookie("__bsi");
        System.out.println("cookie  __bsi值：  "+cookieValue);
        //获取返回cookie所值
        Map<String,String> cookies = resp.cookies();
        System.out.println("所有cookie值：  "+cookies);
        //获取返回头文件值
        String headerValue = resp.header(header);
        System.out.println("头文件"+header+"的值："+headerValue);
        //获取所有头文件值
        Map<String,String> headersOne =resp.headers();
        System.out.println("所有头文件值："+headersOne);
        return headerValue;
        
    }
}
